<template>
  <el-menu
    router
    :default-active="$route.path"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b">
    <menu-item v-for="router in routers" :key="router.path" :index="router.path" :route="{path: router.path}" :router="router"></menu-item>
  </el-menu>
</template>

<script>
  
  import menuItem from './menuItem.vue';
  
  export default {
    components: {
      menuItem
    },
    props: {
      routers: {
        type: Array,
        default: () => []
      }
    },
    mounted() {
      console.log(this.$route);
    }
  }
</script>

<style>
</style>
